<?php

/**
 * AbetDesireCourse filter form base class.
 *
 * @package    sfproject
 * @subpackage filter
 * @author     Your name here
 */
abstract class BaseAbetDesireCourseFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'abet_instructor_id' => new sfWidgetFormPropelChoice(array('model' => 'AbetInstructor', 'add_empty' => true)),
      'des_cou_degree'     => new sfWidgetFormFilterInput(),
      'des_cou_percent'    => new sfWidgetFormFilterInput(),
      'cou_taugh_bef'      => new sfWidgetFormFilterInput(),
      'ins_order'          => new sfWidgetFormFilterInput(),
      'ins_percent'        => new sfWidgetFormFilterInput(),
      'created_at'         => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
      'updated_at'         => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate())),
    ));

    $this->setValidators(array(
      'abet_instructor_id' => new sfValidatorPropelChoice(array('required' => false, 'model' => 'AbetInstructor', 'column' => 'id')),
      'des_cou_degree'     => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'des_cou_percent'    => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'cou_taugh_bef'      => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'ins_order'          => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'ins_percent'        => new sfValidatorSchemaFilter('text', new sfValidatorInteger(array('required' => false))),
      'created_at'         => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
      'updated_at'         => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
    ));

    $this->widgetSchema->setNameFormat('abet_desire_course_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetDesireCourse';
  }

  public function getFields()
  {
    return array(
      'id'                 => 'Number',
      'abet_instructor_id' => 'ForeignKey',
      'cou_num'            => 'ForeignKey',
      'des_cou_degree'     => 'Number',
      'des_cou_percent'    => 'Number',
      'cou_taugh_bef'      => 'Number',
      'ins_order'          => 'Number',
      'ins_percent'        => 'Number',
      'created_at'         => 'Date',
      'updated_at'         => 'Date',
    );
  }
}
